﻿CREATE TABLE [dbo].[PessoaFisica] (
    [Id]                        INT           IDENTITY (1, 1) NOT NULL,
    [NomeCompleto]              VARCHAR (100) NOT NULL,
    [CPF]                       VARCHAR (11)  NULL,
    [RG]                        VARCHAR (10)  NOT NULL,
    [IdResponsavelPessoaFisica] INT           NULL,
    [DataNascimento]            DATETIME      NOT NULL,
    [Sexo]                      CHAR (1)      NULL,
    [IdEstadoCivil]             INT           NULL,
    [Foto]                      VARCHAR (40)  NULL,
    [IdNacionalidade]           INT           DEFAULT ('1') NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF),
    FOREIGN KEY ([IdNacionalidade]) REFERENCES [dbo].[Pais] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION,
    FOREIGN KEY ([IdResponsavelPessoaFisica]) REFERENCES [dbo].[ResponsavelPessoaFisica] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION,
    FOREIGN KEY ([IdEstadoCivil]) REFERENCES [dbo].[EstadoCivil] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
);





